function $json(obj){
	var XPCOM=Components.classes["@mozilla.org/dom/json;1"].createInstance(Components.interfaces.nsIJSON);
	switch (typeof obj){
		case "object":
				return XPCOM.encode(obj);
			break;
		default:
				return XPCOM.decode(obj);
			break;
	}
}